#ifndef STATUSEFFECTS_H
#define STATUSEFFECTS_H
#include "DXUT.h"

struct Status {
	float	fTimeLeft;
	int		iStrength;
	//int		iModificator;

	Status(float timeLeft = 0.0f, int strength = 0);

	Status& operator += (const float& rhs);
	Status& operator -= (const float& rhs);

	bool aktiv();
};

#define PHYSICAL	0x00001
#define FIRE		0x00002
#define FROST		0x00004
#define ELECTRO		0x00008
#define NATURE		0x00010
#define FALLDAMAGE	0x00220
#define BLAST		0x00040
#define PENETRATING 0x00080
#define UNDEFINED	0x00100
#define HIT			0x00200


struct Armor {
	int		iPhysical;
	int		iFire;
	int		iFrost;
	int		iElectro;
	int		iNature;

	Armor();
};

struct Damage {
	UINT	iType;
	float	iValue;
private:
	inline float cdmg(float dmg, float armorcoef, int armor, UINT type);
public:
	Damage(UINT type, float value);

	Damage& operator /= (const Armor& rhs);

	bool clearReg();
};

#endif